cc.Class({
    extends: cc.Component,

    properties: {},

    setFollow(role) {
        this.follow = role;
    },

    doFollow() {
        if (!this.follow) return;
        this.node.setPosition(this.follow.x, this.follow.y);
    },
    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start() {},

    update(dt) {
        this.doFollow();
    },
});
